package jnpf.model.ragFlow.chunk;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.util.List;

@Data
@ApiModel(value = "RetrieveChunksRequest", description = "检索数据块请求")
public class RetrieveChunksRequest {
    @NotBlank(message = "question不能为空")
    @ApiModelProperty(value = "用户查询或关键字", required = true)
    private String question;

    @ApiModelProperty(value = "要搜索的数据集ID列表")
    private List<String> dataset_ids;

    @ApiModelProperty(value = "要搜索的文档ID列表")
    private List<String> document_ids;

    @ApiModelProperty(value = "页码", example = "1")
    private Integer page = 1;

    @ApiModelProperty(value = "每页大小", example = "30")
    private Integer page_size = 30;

    @ApiModelProperty(value = "最低相似度分数", example = "0.2")
    private Float similarity_threshold = 0.2f;

    @ApiModelProperty(value = "向量余弦相似度权重", example = "0.3")
    private Float vector_similarity_weight = 0.3f;

    @ApiModelProperty(value = "参与向量计算的块数", example = "1024")
    private Integer top_k = 1024;

    @ApiModelProperty(value = "重排序模型ID")
    private String rerank_id;

    @ApiModelProperty(value = "是否启用关键字匹配", example = "false")
    private Boolean keyword = false;

    @ApiModelProperty(value = "是否高亮匹配词", example = "false")
    private Boolean highlight = false;
}
